Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Management] New Api version introduced along with new contracts for the Diagnostics resource #3066

Merged
merged 5 commits into from
Jun 26, 2018

Conversation

promoisha
Copy link
Contributor

@promoisha promoisha commented May 14, 2018

Please, do not merge yet. Thanks!

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@promoisha
Copy link
Contributor Author

@solankisamir Samir, could you also take a look? Thanks!

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/apimanagement/resource-manager/readme.md

⚠️0 new Warnings.(89 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/apimanagement/resource-manager/readme.md

⚠️34 new Warnings.(34 total)
Code Id Source Message
PageableOperation R2029 Link Based on the response model schema, operation 'Policy_ListByService' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'PolicySnippets_ListByService' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'ApiOperationPolicy_ListByOperation' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'ApiPolicy_ListByApi' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'NotificationRecipientUser_ListByNotification' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'NotificationRecipientEmail_ListByNotification' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'NetworkStatus_ListByLocation' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'ProductPolicy_ListByProduct' might be pageable. Consider adding the x-ms-pageable extension.
PageableOperation R2029 Link Based on the response model schema, operation 'QuotaByCounterKeys_ListByService' might be pageable. Consider adding the x-ms-pageable extension.
PostOperationIdContainsUrlVerb R2066 Link OperationId should contain the verb: 'updatecertificate' in:'ApiManagementService_UploadCertificate'. Consider updating the operationId
OperationIdNounConflictingModelNames R2063 Link OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'OperationModel'. Consider using the plural form of 'Operation' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
DescriptionAndTitleMissing R4000 Link 'BodyDiagnosticSettings' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
DescriptionAndTitleMissing R4000 Link 'HttpMessageDiagnostic' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
DescriptionAndTitleMissing R4000 Link 'PipelineDiagnosticSettings' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
DescriptionAndTitleMissing R4000 Link 'SamplingSettings' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Api_CreateOrUpdate' Request Model: 'ApiCreateOrUpdateParameter' Response Model: 'ApiContract'
XmsEnumValidation R2018 Link The enum types should have x-ms-enum type extension set with appropriate options. Property name: versioningScheme
XmsEnumValidation R2018 Link The enum types should have x-ms-enum type extension set with appropriate options. Property name: storeName
DescriptionAndTitleMissing R4000 Link 'apiVersionSet' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
AvoidNestedProperties R2001 Link Consider using x-ms-client-flatten to provide a better end user experience
LongRunningOperationsWithLongRunningExtension R2007 Link The operation 'Backend_Reconnect' returns 202 status code, which indicates a long running operation, please enable "x-ms-long-running-operation.
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Certificate_CreateOrUpdate' Request Model: 'CertificateCreateOrUpdateParameters' Response Model: 'CertificateContract'
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'EmailTemplate_CreateOrUpdate' Request Model: 'EmailTemplateUpdateParameters' Response Model: 'EmailTemplateContract'
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Group_CreateOrUpdate' Request Model: 'GroupCreateParameters' Response Model: 'GroupContract'
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Subscription_CreateOrUpdate' Request Model: 'SubscriptionCreateParameters' Response Model: 'SubscriptionContract'
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Tag_CreateOrUpdate' Request Model: 'TagCreateUpdateParameters' Response Model: 'TagContract'
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'TagDescription_CreateOrUpdate' Request Model: 'TagDescriptionCreateParameters' Response Model: 'TagDescriptionContract'
PutInOperationName R1006 Link 'PUT' operation 'Tag_AssignToApi' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
DeleteInOperationName R1009 Link 'DELETE' operation 'Tag_DetachFromApi' should use method name 'Delete'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
PutInOperationName R1006 Link 'PUT' operation 'Tag_AssignToOperation' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
DeleteInOperationName R1009 Link 'DELETE' operation 'Tag_DetachFromOperation' should use method name 'Delete'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
PutInOperationName R1006 Link 'PUT' operation 'Tag_AssignToProduct' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
DeleteInOperationName R1009 Link 'DELETE' operation 'Tag_DetachFromProduct' should use method name 'Delete'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
PutRequestResponseScheme R2017 Link A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'User_CreateOrUpdate' Request Model: 'UserCreateParameters' Response Model: 'UserContract'
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@hovsepm hovsepm added the DoNotMerge <valid label in PR review process> use to hold merge after approval label May 14, 2018
@hovsepm
Copy link
Contributor

hovsepm commented May 14, 2018

Please ping me directly via email or IM when you will be ready to merge.

@solankisamir
Copy link
Member

@promoisha can you take a look at the 3 failures at
https://travis-ci.org/Azure/azure-rest-api-specs/jobs/378838912

"percentage": {
"type": "number",
"format": "double",
"description": "Rate of sampling for fixed-rate sampling."
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format the file in VS Code #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
}
},
"PipelineDiagnosticSettings": {
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing description #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

],
"description": "Diagnostic details."
},
"SamplingSettings": {
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing description. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
}
},
"HttpMessageDiagnostic": {
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing description #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
}
},
"BodyDiagnosticSettings" : {
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing top level description #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"properties": {
"alwaysLog": {
"type": "string",
"description": "Specifies for what type of messages sampling settings should not apply. By now only the 'allErrors' value is supported."
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description [](start = 11, length = 11)

description [](start = 11, length = 11)

we can define it an an enum, so it becomes easy in the client. Also set the modelAsString property to true, so it would not be considered breaking change, when you add more values. Look for x-ms-enum property in the spec. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"bytes": {
"type": "integer",
"format": "int32",
"description": "Number of request body bytes to log."
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description [](start = 11, length = 11)

description [](start = 11, length = 11)

does it have a max value. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"name": "$filter",
Copy link
Member

@solankisamir solankisamir May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any change to the $filter contract after change to the DiagnosticContract #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no changes here

@promoisha promoisha force-pushed the gleb_apim_appinsightsintegrationga branch from 99cf5a3 to 239b96a Compare May 14, 2018 19:22
@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/apimanagement/resource-manager/readme.md

⚠️0 new Warnings.(30 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/apimanagement/resource-manager/readme.md

⚠️0 new Warnings.(89 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

"PipelineDiagnosticSettings": {
"properties": {
"request": {
"allOf": [
Copy link
Member

@solankisamir solankisamir May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allOf [](start = 11, length = 5)

why "allOf" ... and why not a simple $ref
request : { "$ref": "#/definitions/HttpMessageDiagnostic", "description: "" } #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"description": "Resource Id of a target logger."
},
"sampling": {
"allOf": [
Copy link
Member

@solankisamir solankisamir May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "allOf" and why not a simple "$ref" #Closed

Copy link
Member

@solankisamir solankisamir May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for others which define only one $ref


In reply to: 189126276 [](ancestors = 189126276)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"apiId": "57d1f7558aa04f15146d9d8a",
"parameters": {
"properties": {
"enabled": true
Copy link
Member

@solankisamir solankisamir May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"enabled": true [](start = 8, length = 15)

"enabled": true [](start = 8, length = 15)

The CI is complaining about this property in the example https://travis-ci.org/Azure/azure-rest-api-specs/jobs/378880669 #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"diagnosticId": "applicationinsights",
"parameters": {
"properties": {
"enabled": true
Copy link
Member

@solankisamir solankisamir May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true [](start = 19, length = 4)

true [](start = 19, length = 4)

CI is complaining about this property
https://travis-ci.org/Azure/azure-rest-api-specs/jobs/378880669 #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@solankisamir
Copy link
Member

            }

CI is throwing errors for this
https://travis-ci.org/Azure/azure-rest-api-specs/jobs/378880669


Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/examples/ApiManagementTenantConfigurationDeploy.json:27 in 239b96a. [](commit_id = 239b96a057b3647273e25d9ee56764587d71b4cd, deletion_comment = False)

@promoisha promoisha force-pushed the gleb_apim_appinsightsintegrationga branch from 239b96a to 5961b92 Compare May 29, 2018 18:59
@AutorestCI
Copy link

AutorestCI commented May 29, 2018

Automation for azure-libraries-for-java

Nothing to generate for azure-libraries-for-java

@AutorestCI
Copy link

AutorestCI commented May 29, 2018

Automation for azure-sdk-for-python

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-python#2135

@azuresdkci azuresdkci assigned marstr and unassigned hovsepm Jun 8, 2018
@azuresdkci azuresdkci requested a review from marstr June 8, 2018 21:03
@marstr
Copy link
Member

marstr commented Jun 15, 2018

Offline @promoisha has asked to merge this PR.

However, as @solankisamir has pointed out, there are unaddressed linter errors. Also, this is a huge PR. @promoisha, could you give me context about:

  1. The API Version this is based on, so I can scrape the differences locally.
  2. Why ARM hasn't been requested for review on this.
  3. If there is a former PR in the private repository.

@solankisamir
Copy link
Member

          }

can you sync the latest changes from the version 2018-01-01


Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/examples/ApiManagementServiceGetNetworkStatus.json:47 in 412a225. [](commit_id = 412a225, deletion_comment = False)

@promoisha
Copy link
Contributor Author

@marstr

  1. 2018-01-01
  2. because the introduced version is the preview one
  3. No, this is the only PR

@promoisha
Copy link
Contributor Author

@solankisamir done

@promoisha
Copy link
Contributor Author

@marstr @solankisamir regarding linter errors - there's nothing that this PR has introduced. The only suspicious thing is this: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/392948757. But nothing has changed there and the response contract is valid (the very same example in the previous api version doesn't trigger this error).

@marstr marstr added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jun 19, 2018
@marstr
Copy link
Member

marstr commented Jun 19, 2018

@promoisha says:
2. because the introduced version is the preview one

Ah, sorry I believe that we still look for ARM sign-off on preview API Versions.

I'm adding the "WaitForARMFeedback" label, but it should go quick because the ARM team should only really have to review the changes from the API Version this one is based on.

"$ref": "#/parameters/ProductIdParameter"
},
{
"$ref": "./apimapis.json#/parameters/ApiIdParameter"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ApiIdParameter [](start = 49, length = 14)

this file also changed today for a bug fix.

Copy link
Member

@marstr marstr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should at least fix this model error: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/392948757#L1048

In terms of this error: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/392948757#L1052
I'd like to see it fixed, because it's basically saying that null does not fit the json.org definition of a JSON object. However, if it's really a carry-over from the last API-Version then I can let it go.

Other than that, nothing jumped out to me :)

Copy link
Member

@solankisamir solankisamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you can sync the latest changes from apimproducts.json, I am good for signoff

@promoisha promoisha force-pushed the gleb_apim_appinsightsintegrationga branch from bf73627 to ce0aafd Compare June 19, 2018 23:58
@promoisha
Copy link
Contributor Author

@solankisamir updated the apimproducts.json with latest changes

@AutorestCI
Copy link

AutorestCI commented Jun 20, 2018

Automation for azure-sdk-for-java

Nothing to generate for azure-sdk-for-java

@promoisha
Copy link
Contributor Author

@marstr validation error is fixed now

Copy link
Member

@marstr marstr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once @ravbhatnagar has his review in, I'll be ready to merge.

@promoisha
Copy link
Contributor Author

@ravbhatnagar could you please look into this PR?

@marstr marstr added ARM-overdue ARM review has not occurred within the expected timeframe and removed DoNotMerge <valid label in PR review process> use to hold merge after approval WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jun 26, 2018
@marstr marstr merged commit c8aca97 into Azure:master Jun 26, 2018
tianxchen-ms referenced this pull request in test-repo-billy/azure-rest-api-specs Apr 26, 2022
dw511214992 referenced this pull request in dw511214992/azure-rest-api-specs Jul 8, 2022
dw511214992 referenced this pull request in test-repo-billy/azure-rest-api-specs Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM-overdue ARM review has not occurred within the expected timeframe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants